package com.example.mybatisplusdemo.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

/**
 * mybatis-plus 通用枚举
 */
@Getter
public enum SexEnum {

    MAN(0, "男"),
    WOMAN(1, "女");

    @EnumValue
    private final int code;
    @JsonValue
    private final String desc;

    SexEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}